@extends('backend.layouts.master')

@section('title', '游戏管理')

@section('content')
  <!-- content start -->
  <div class="admin-content">

    <div class="am-cf am-padding">
      <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">游戏管理</strong> / <small></small></div>
    </div>

    <div class="am-g">
      <div class="am-u-sm-12 am-u-md-6">
        <div class="am-btn-toolbar">
          <div class="am-btn-group am-btn-group-xs">
            <a href="{{url('/backend/addgamemanage')}}"> <button type="button" class="am-btn am-btn-default"><span class="am-icon-plus"></span> 新增</button></a>
            {{--<button type="button" class="am-btn am-btn-default"><span class="am-icon-save"></span> 保存</button>
            <button type="button" class="am-btn am-btn-default"><span class="am-icon-archive"></span> 审核</button>
            <button type="button" class="am-btn am-btn-default"><span class="am-icon-trash-o"></span> 删除</button>--}}
          </div>
        </div>
      </div>
    </div>

    <div class="am-g" style="min-height: 800px;">



      <div class="am-u-sm-12">
        <br />
        <div  @if  (!Session::get('message')) style="display:none;" @endif  class="am-alert  @if  (Session::get('message.type')=='s')am-alert-success @endif @if (Session::get('message.type')=='w')am-alert-warning @endif @if (Session::get('message.type')=='d')am-alert-danger @endif" data-am-alert>
          <button type="button" class="am-close">&times;</button>
          <p>{{ Session::get('message.message') }}</p>
        </div>
          <table class="am-table am-table-striped am-table-hover table-main">
            <thead>
              <tr><th class="table-id">ID</th><th class="table-title">标题</th><th class="table-type">游戏</th><th class="table-date am-hide-sm-only">修改日期</th><th class="table-set">操作</th>
              </tr>
          </thead>
          <tbody>


            <?php foreach ($games as $game): ?>

            <tr>
              <td>{{$game->id}}</td>
              <td><a href="#">{{$game->title}}</a></td>
              <td>{{$game->type}}</td>
              <td class="am-hide-sm-only">{{$game->created_at}}</td>
              <td>
                <div class="am-btn-toolbar">
                  <div class="am-btn-group am-btn-group-xs">
                    <a href="{{url('/backend/editgamemanage')}}?id={{$game->id}}"  class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑</a>
                    <a href="{{url('/backend/delgamemanage')}}?id={{$game->id}}" class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><span class="am-icon-trash-o"></span> 删除</a>
                  </div>
                </div>
              </td>
            </tr>

            <?php endforeach; ?>

          </tbody>
        </table>
          <div class="am-cf">
            <?php echo $games->render(); ?>
      </div>

    </div>
  </div>
  <!-- content end -->
@stop